var e = require;
var t = module;
cc.Class({
    extends: cc.Component,
    properties: {nodeShare: cc.Node, labelWinTip: cc.Label},
    onDestroy: function onDestroy() {
        "TT" == lplatform.channel && lplatform.hideBanner(),
            this.delayInterstitialTimeout && clearTimeout(this.delayInterstitialTimeout);
    },
    start: function start() {
        if (
            ((this.tips = [
                "旌旗十万斩阎罗",
                "待到秋来九月八",
                "我花开后百花杀",
                "冲天香阵透长安",
                "满城尽带黄金甲",
                "朝朝马策与刀环",
                "冰簟银床梦不成",
                "碧天如水夜云轻",
                "雁声远过潇湘去",
                "十二楼中月自明",
                "葡萄美酒夜光杯",
                "欲饮琵琶马上催",
                "醉卧沙场君莫笑",
                "古来征战几人回",
                "八月湖水平",
                "涵虚混太清",
                "气蒸云梦泽",
                "波撼岳阳城",
                "欲济无舟楫",
                "端居耻圣明",
                "坐观垂钓者",
                "徒有羡鱼情",
                "赵客缦胡缨",
                "吴钩霜雪明",
                "银鞍照白马",
                "飒沓如流星",
                "十步杀一人",
                "千里不留行",
                "事了拂衣去",
                "深藏身与名",
                "闲过信陵饮",
                "脱剑膝前横",
                "持觞劝侯嬴",
                "三杯吐然诺",
                "五岳倒为轻",
                "意气素霓生",
                "千秋二壮士",
                "烜赫大梁城"
            ]),
            soundMgr.playSound(soundMgr.win),
            (this.nodeShare.active = !1),
            (this.labelWinTip.string = this.tips[Math.floor(Math.random() * this.tips.length)]),
            "Android" != lplatform.channel && "iOS" != lplatform.channel)
        ) {
            var e = 100;
            lplatform.labData.mainSwitch && (e = 1850),
                (this.delayInterstitialTimeout = lplatform.showDelayInterstitial(e));
        }
        lplatform.showBanner();
    },
    winNextLvClick: function winNextLvClick() {
        if (
            (lGlobal.loadLevel(void 0, lGlobal.realLevel + 1),
            soundMgr.playSound(soundMgr.btn),
            console.log("lplatform.labData.sendToTable:" + lplatform.labData.sendToTable),
            lplatform.labData.sendToTable)
        ) {
            var e = Math.random();
            console.log("rnd:" + e), e < lplatform.labData.sendToTable && lplatform.showFavoriteGuide();
        }
        "Android" == lplatform.channel || "iOS" == lplatform.channel
            ? lplatform.showInterstitial()
            : lplatform.timeVideoAd(function () {});
    },
    goToMainClick: function goToMainClick() {
        cc.director.loadScene("Menu"), soundMgr.playSound(soundMgr.btn);
    },
    winShareClick: function winShareClick() {
        var e = this;
        lplatform.shareRecord(
            function () {
                e.nodeShare.active = !1;
            },
            function () {}
        );
    },
    update: function update() {
        lplatform.canShareRecord()
            ? this.nodeShare && !this.nodeShare.active && (this.nodeShare.active = !0)
            : this.nodeShare && this.nodeShare.active && (this.nodeShare.active = !1);
    }
});
